Add cargo {test,bench} -p <spec>
authorAlex Crichton <alex@alexcrichton.com>
Wed, 24 Sep 2014 01:10:27 +0000 (18:10 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 29 Sep 2014 23:54:45 +0000 (16:54 -0700)
commitf97cef0c3088c0d577fd28b6e06ef92e4f47f31f
tree488bd730f056c95b9545813ffd50ff0938e3bc73
parent69bc3d055a38de18bba4d3b385ba16c3067f596f
Add cargo {test,bench} -p <spec>

This functionality allows running tests and benchmarks on any upstream
dependencies in the dependency graph. This is most useful for path sources all
developed in tandem (see Servo for instance).

In terms of built artifacts, this will actually preserve as many artifacts as
possible. That means that if you test a low-level dependency with the high-level
artifacts already built, the high-level artifacts will not get removed. This
means that it's possible to accidentally have a low-level dependency to depend
on a higher level one just because it's lib is picked up via -L, but this is
generally a necessary evil to get testing to not rebuild packages too often.

Closes #483
src/bin/bench.rs
src/bin/build.rs
src/bin/clean.rs
src/bin/test.rs
src/cargo/ops/cargo_compile.rs
src/cargo/ops/cargo_rustc/job.rs
src/cargo/ops/cargo_rustc/job_queue.rs
src/cargo/ops/cargo_rustc/mod.rs
tests/test_cargo_compile_git_deps.rs
tests/test_cargo_compile_path_deps.rs
tests/test_cargo_test.rs